180 NEXT : IF CT >(82 +5) THEN VTAB 20: CALL -958: PRINT "ADDRESS TOTALS MORE THAN 82 CHARACTERS.": PRINT "RE-DO THE ENTRIES TO SHORTEN THEM.": INPUT "<RETURN> TO RE-DO:";XX$: VTAB 20: CALL -958: GOTO 130
190 VTAB 20: CALL -868: INPUT "<RETURN> = ACCEPT... R = RE-ENTER:";XX$: IF XX$ < >"" AND XX$ < >"R" AND XX$ < >"r" THEN 190
200 IF XX$ = "R" THEN VTAB 20: CALL -868: PRINT "PRESS RETURN TO ACCEPT EXISTING DATA": GOTO 130
210 RETURN
220 :
230 :
240 : REM [ SAVE ADDRESS TO DISK ]
250 PRINT D$;"OPEN ADDRESSES,L87"
260 PRINT D$;"WRITE ADDRESSES,R";N
270 FOR F = 1 TO 5: PRINT A$(F): NEXT
280 PRINT D$;"CLOSE"
290 RETURN
300 :
310 :
320 : REM [ READ SINGLE ADDRESS ]
330 PRINT D$;"OPEN ADDRESSES,L87"
340 PRINT D$;"READ ADDRESSES,R";N
350 FOR F = 1 TO 5: INPUT A$(F): NEXT
360 PRINT D$;"CLOSE"
370 RETURN
380 :
390 :
400 : REM [ SCAN/SEARCH ADDRESSES ]
410 PRINT D$;"OPEN ADDRESSES,L87"
420 FOR I = 1 TO R
430 PRINT D$;"READ ADDRESSES,R";I
440 INPUT A$(1): IF LEFT$(A$(1),L) = N$ THEN N = I:I = R
450 NEXT I
460 PRINT D$;"CLOSE"
470 RETURN
480 :
490 :
500 : REM [ SETUP ]
510 HOME : VTAB 5
520 HTAB 10: PRINT "NIBBLE TINY MAILER EDIT"
530 PRINT : PRINT "THIS PROGRAM LETS YOU EDIT NAMES AND": PRINT "ADDRESSES IN YOUR RANDOM DISK FILE."
540 PRINT : PRINT "YOU'LL RETRIEVE AN ADDRESS RECORD BY": PRINT "ITS RECORD NUMBER OR BY THE NAME OF THE": PRINT "PERSON. THEN YOU CAN CHANGE ANY ITEM"
550 PRINT "IN THE ADDRESS AND WRITE THE CORRECTED": PRINT "ADDRESS BACK INTO ITS PROPER POSITION": PRINT "IN THE FILE."
560 PRINT : PRINT "YOU'LL ALSO HAVE THE CHANCE TO RE-ENTER": PRINT "AND CORRECT ANY MISTAKES BEFORE SAVING"
570 PRINT "THE NAME AND ADDRESS TO THE DISK FILE.": PRINT : PRINT " (CHECKING THE DISK FILE)"
580 :
590 :
600 : REM [ CHECK WHETHER FILE EXISTS ]
610 D$ = CHR$(4)
620 ONERR GOTO 880
630 PRINT D$;"VERIFY ADDRESSES"
640 PRINT D$;"OPEN ADDRESSES,L87"
650 PRINT D$;"READ ADDRESSES,R0": INPUT R
660 PRINT D$;"CLOSE ADDRESSES"
670 IF R = 0 THEN HOME : VTAB 10: PRINT "THERE ARE NO RECORDS CURRENTLY IN YOUR": PRINT "ADDRESSES FILE. PLEASE ENTER AT LEAST": PRINT "ONE ADDRESS BEFORE USING THIS PROGRAM.": HOME : END
680 PRINT : INPUT "PRESS RETURN FOR NEXT PAGE:";XX$
690 HOME : VTAB 9: PRINT "THERE ARE ";R;" RECORDS IN THE FILE.": PRINT : PRINT "YOU CAN RETRIEVE A RECORD BY ENTERING:": PRINT : PRINT " * A RECORD NUMBER (OR)": PRINT : PRINT " * A FULL OR PARTIAL PERSON'S NAME"
700 PRINT : PRINT " FOR EXAMPLE: SAM JONES": PRINT " SAM JON": PRINT " SAM J"
710 PRINT : INPUT "PRESS RETURN TO BEGIN:";XX$
720 :
730 :
740 : REM MAIN CONTROL LOOP
750 HOME : VTAB 8: PRINT "ENTER: RECORD #(1-";R;") OR ": PRINT " NAME (FULL OR PARTIAL) OR": PRINT " Q TO QUIT": PRINT : INPUT "ENTER: ";N$:N = VAL(N$): IF LEN(N$) = 0 THEN 750
760 IF N$ = CHR$(113) OR N$ = CHR$(81) THEN 830: REM TEST END
770 IF N >0 AND N >R THEN PRINT "THAT RECORD NUMBER IS LARGER THAN THE": INPUT "FILE CONTENTS. PRESS <RETURN>:";XX$: GOTO 750
780 IF N >0 THEN GOSUB 330: GOTO 800: REM RETRIEVE REC #
790 IF N = 0 THEN L = LEN(N$): GOSUB 410: IF N >0 THEN GOSUB 330: GOTO 800: REM SEARCH ON NAME
800 IF N = 0 THEN PRINT : PRINT "A NAME MATCH WAS NOT FOUND.": INPUT "PRESS <RETURN> TO TRY AGAIN:";XX$: GOTO 750
810 GOSUB 110: REM EDIT ADDRESS
820 GOSUB 250: REM SAVE ADDRESS
830 HOME : VTAB 10: INPUT "<RETURN> = ENTER ANOTHER... E = END:";XX$: IF XX$ < >"" AND XX$ < >"E" AND XX$ < >"e" THEN 830
840 IF XX$ = "E" THEN PRINT "END OF ADDRESS EDIT": HOME : END
850 GOTO 750: REM ENTER ANOTHER
860 :
870 : REM ERROR MESSAGE
880 POKE 216,0: REM RESET ERROR POINTER
890 HOME : VTAB 10: PRINT "YOU HAVE ENCOUNTERED A FILE ERROR WITH": PRINT "THE ATTEMPT TO READ THE ADDRESSES FILE."
900 PRINT : PRINT "CHECK TO MAKE SURE THAT THE ADDRESSES": PRINT "FILE IS ON THIS DISK, OR SAVE A COPY": PRINT "OF THIS PROGRAM ON THE SAME DISK THAT"